import http from '../utils/http/http.js'

const getRecentWorks = () => {
    return http.get("/getRecentWorks");
};

const updateTaskText = (data) => {
  return http.post("/updateTaskText",data)
}


const getDepartments = () => {
  return http.get("/getDepartments");
};

const getMembers = () => {
  return http.get("/getMembers");
};

const getOrder= (data) => {
  return http.get("/getOrder",data);
};

const addOrder = (data) => {
  return http.post("/addOrder",data);
};

const updateOrder = (data) => {
  return http.post("/updateOrder",data);
};

const goComplete = (data) => {
    return http.post("/goComplete", data);
};
const delOrder = (data) => {
    return http.post("/delOrder", data);
};

const getCount = (data) => {
  return http.get("/getCount",data);
}

const getAllOrders = (data) => {
  return http.get("/getWorkOrders",data);
}


const getDistinctYears = () => {
  return http.get("/getDistinctYears");
}

const getBusinessList = (data) => {
  return http.get("/getBusinessList",data);
}

const getPersonList = () => {
  return http.get("/getPersonList");
}

const getMyListByMonth = (data) => {
  return http.get("/getMyListByMonth", data);
};
const getAllListByMonth = (data) => {
  return http.get("/getAllListByMonth", data);
};
const getAllScoresByMonth = (data) => {
  return http.get("/getAllScoresByMonth", data);
};
const addScore = (data) => {
  return http.post("/addScore",data);
};

const getExcelDataByMonth = (data) => {
  return http.get("/getExcelDataByMonth",data);
};

const handleMyOrder = (data) => {
  return http.post("/handleMyOrder",data);
};

const delMyOrder = (data) => {
  return http.post("/delMyOrder", data);
};

const getMyScoreByMonth = (data) => {
  return http.get("/getMyScoreByMonth", data);
};

const getGoodListByMonth = (data) => {
  return http.get("/getGoodListByMonth", data);
};

const getMyGoodListByMonth = (data) => {
  return http.get("/getMyGoodListByMonth", data);
};

const addGood = (data) => {
  return http.post("/addGood", data);
};

const delGood = (data) => {
  return http.post("/delGood", data);
};

const getOthers = (data) => {
  return http.get("/getOthers", data);
};

const updateOther = (data) => {
  return http.post("/updateOther",data);
};

const addOther = (data) => {
  return http.post("/addOther",data);
};

const getOther= (data) => {
  return http.get("/getOther",data);
};

const delOther= (data) => {
  return http.post("/delOther",data);
};

const handleAI= (data) => {
  return http.post("/handleAI",data);
};

const moveToNextMonth= (data) => {
  return http.post("/moveToNextMonth",data);
};

const getRestScore= (data) => {
  return http.get("/getRestScore",data);
};

export default {
  addOrder,updateOrder,getDepartments, getMembers,getRecentWorks,goComplete,getOrder,delOrder,getCount,getDistinctYears,getAllOrders,getBusinessList,getPersonList,getMyListByMonth,getAllListByMonth,addScore,getAllScoresByMonth,getExcelDataByMonth,handleMyOrder,delMyOrder,getMyScoreByMonth,getGoodListByMonth,addGood,delGood,getMyGoodListByMonth,updateTaskText,getOthers,updateOther,addOther,getOther,delOther,handleAI,moveToNextMonth,getRestScore
}